﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yunzuan.Foundation.Attributes;
using Yunzuan.Foundation.Entities;

namespace CloudDiamonds.Models.DBModels
{
    [Table(TableName = "yz_order_emerald", PrimaryKey = "OrderID")]
    public class EmeraldOrderInfo : BaseEntity
    {
        #region Private Properties  产品订单相关（统包，彩宝，成品等）
        private int? id;
        private int orderID;
        private int? userID;  //销售
        private int? purchaseUserID; //采购
        private int? _customerID;
        private int? _orderStatus;
        private int? _paymentStatus;
        private int? _orderType;
        private string remarks;
        private string salesRemarks;
        private string goodsRemark;
        private string purchaseRemarks;
        private decimal confirmPrice;
        private DateTime? _addTime;
        private DateTime? _editTime;
        private DateTime? arrivalTime;
        private string shipNo; //出货单号
        private string shipRemarks; //出货备注
        private DateTime? shipTime; //出货时间
        private DateTime? payTime;
        private int? _receiptStatus;
        private short? _curType;//到货结算币种 1rmb 2usd 
        private DateTime? _recTime;    //支付时间       
        private decimal? _receiptPrice;
        private decimal? _purchaseRMB;//采购RMB
        private decimal? _priceUSD;
        private decimal? _purchaseExchangerate;
        private decimal? _freight;//运费 11-11 ?可空 无默认值的
        private decimal? _confirmusd;//卖出usd 01-11
        private decimal? _confirmdiscount;
        private decimal? _salesExchangerate;


        //数据中心
        private string originSN;
        private DateTime? insertTime;
        private DateTime? updateTime;
        private string supplier;
        private int? onShelves;

        private string images;
        private string name;  //varchar(60) NOT NULL DEFAULT '', 产品名称
        private int category; 
        private int type; // tinyint(2) NOT NULL DEFAULT '0', 类别1
        private int type2;  //`Type2` tinyint(2) NOT NULL DEFAULT '0', 类别2

        private int texture;  //`Texture` tinyint(2) NOT NULL DEFAULT '0', 种地
        private string color;
        private string certType;
        private string certNo;
        private string country; //NOT NULL DEFAULT '', 国家
   
        private string state;  //varchar(20) NOT NULL DEFAULT '', 州省
        private string measurement;
        private decimal? price;
        private string comments;
        //数据中心end
        #endregion
        #region Public Properties


        public string ShipRemarks
        {
            get { return shipRemarks; }
            set { this.ChangeNotify<string>("ShipRemarks", value, ref shipRemarks); }
        }
        public string ShipNo
        {
            get
            {
                return shipNo;
            }
            set
            {
                this.ChangeNotify<string>("ShipNo", value, ref shipNo);
            }
        }
        public DateTime? ShipTime
        {
            get
            {
                return shipTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("ShipTime", value, ref shipTime);
            }
        }

        public DateTime? PayTime
        {
            get
            {
                return payTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("PayTime", value, ref payTime);
            }
        }
        /// <summary>
        /// 确认退点
        /// </summary>
        public decimal? Confirmdiscount
        {
            get { return _confirmdiscount; }
            set { this.ChangeNotify<decimal?>("Confirmdiscount", value, ref _confirmdiscount); }
        }
        /// <summary>
        /// OrderID.
        /// </summary>
        [Column(IsAutoIncrement = true)]
        public int OrderID
        {
            get { return orderID; }
            set { this.ChangeNotify<int>("OrderInfoID", value, ref orderID); }
        }

        public int? ID
        {
            get
            {
                return id;
            }
            set
            {
                this.ChangeNotify<int?>("ID", value, ref id);
            }
        }
        /// <summary>
        /// 运费￥ 11-11
        /// </summary>
        public decimal? Freight
        {
            //? 可空 无默认值的 11-11
            get { return _freight; }
            set
            {
                this.ChangeNotify<decimal?>("Freight", value, ref _freight);
            }
        }
        /// <summary>
        /// SalesExchangerate.
        /// </summary>
        public decimal? SalesExchangerate
        {
            get
            {
                return _salesExchangerate;
            }
            set
            {
                this.ChangeNotify<decimal?>("SalesExchangerate", value, ref _salesExchangerate);
            }
        }
        /// <summary>
        /// 卖出美金 2017-01-11
        /// </summary>
        public decimal? ConfirmUSD
        {
            get { return _confirmusd; }
            set { this.ChangeNotify<decimal?>("ConfirmUSD", value, ref _confirmusd); }
        }
        /// <summary>
        /// CurType 到货结算币种
        /// </summary>
        public short? CurType
        {
            get { return _curType; }
            set
            {
                this.ChangeNotify<short?>("CurType", value, ref _curType);
            }
        }
        public DateTime? RecTime
        {
            get { return _recTime; }
            set
            {
                this.ChangeNotify<DateTime?>("RecTime", value, ref _recTime);
            }
        }
        /// <summary>
        /// ReceiptPrice
        /// </summary>
        public decimal? ReceiptPrice
        {
            get
            {
                return _receiptPrice;
            }
            set
            {
                this.ChangeNotify<decimal?>("ReceiptPrice", value, ref _receiptPrice);
            }
        }
        /// <summary>
        /// PurchaseExchangerate.
        /// </summary>
        public decimal? PurchaseExchangerate
        {
            get
            {
                return _purchaseExchangerate;
            }
            set
            {
                this.ChangeNotify<decimal?>("PurchaseExchangerate", value, ref _purchaseExchangerate);
            }
        }
        /// <summary>
        /// PurchaseRMB
        /// </summary>
        public decimal? PurchaseRMB
        {
            get
            {
                return _purchaseRMB;
            }
            set
            {
                this.ChangeNotify<decimal?>("PurchaseRMB", value, ref _purchaseRMB);
            }
        }
        /// <summary>
        /// PriceUSD.
        /// </summary>
        public decimal? PriceUSD
        {
            get
            {
                return _priceUSD;
            }
            set
            {
                this.ChangeNotify<decimal?>("PriceUSD", value, ref _priceUSD);
            }
        }



        public int? UserID
        {
            get { return userID; }
            set { this.ChangeNotify<int?>("UserID", value, ref userID); }
        }
        public int? PurchaseUserID
        {
            get { return purchaseUserID; }
            set { this.ChangeNotify<int?>("PurchaseUserID", value, ref purchaseUserID); }
        }


        public int? CustomerID
        {
            get
            {
                return _customerID;
            }
            set
            {
                this.ChangeNotify<int?>("CustomerID", value, ref _customerID);
            }
        }
        public int? OrderStatus
        {
            get
            {
                return _orderStatus;
            }
            set
            {
                this.ChangeNotify<int?>("OrderStatus", value, ref _orderStatus);
            }
        }
        public int? PaymentStatus
        {
            get
            {
                return _paymentStatus;
            }
            set
            {
                this.ChangeNotify<int?>("PaymentStatus", value, ref _paymentStatus);
            }
        }
        public int? OrderType
        {
            get
            {
                return _orderType;
            }
            set
            {
                this.ChangeNotify<int?>("OrderType", value, ref _orderType);
            }
        }

        public string Remarks
        {
            get
            {
                return remarks;
            }
            set
            {
                this.ChangeNotify<string>("Remarks", value, ref remarks);
            }
        }
        public string SalesRemarks
        {
            get
            {
                return salesRemarks;
            }
            set
            {
                this.ChangeNotify<string>("SalesRemarks", value, ref salesRemarks);
            }
        }

        public string GoodsRemark
        {
            get
            {
                return goodsRemark;
            }
            set
            {
                this.ChangeNotify<string>("GoodsRemark", value, ref goodsRemark);
            }
        }
        public string PurchaseRemarks
        {
            get
            {
                return purchaseRemarks;
            }
            set
            {
                this.ChangeNotify<string>("PurchaseRemarks", value, ref purchaseRemarks);
            }
        }

        /// <summary>
        /// 收款 已付未付付
        /// </summary>
        public int? ReceiptStatus
        {
            get { return _receiptStatus; }
            set { this.ChangeNotify<int?>("ReceiptStatus", value, ref _receiptStatus); }
        }
        public decimal ConfirmPrice
        {
            get
            {
                return confirmPrice;
            }
            set
            {
                this.ChangeNotify<decimal>("ConfirmPrice", value, ref confirmPrice);
            }
        }

        public DateTime? AddTime
        {
            get
            {
                return _addTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("AddTime", value, ref _addTime);
            }
        }

        public DateTime? EditTime
        {
            get
            {
                return _editTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("EditTime", value, ref _editTime);
            }
        }
        public DateTime? ArrivalTime
        {
            get
            {
                return arrivalTime;
            }
            set
            {
                this.ChangeNotify<DateTime?>("ArrivalTime", value, ref arrivalTime);
            }
        }
        //数据中心
        public DateTime? InsertTime { get { return insertTime; } set { this.ChangeNotify<DateTime?>("InsertTime", value, ref insertTime); } } //datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 入库时间，不用手动指定
        public DateTime? UpdateTime { get { return updateTime; } set { this.ChangeNotify<DateTime?>("UpdateTime", value, ref updateTime); } } //datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 更新时间，不用手动指定
        public string Supplier { get { return supplier; } set { this.ChangeNotify<string>("Supplier", value, ref supplier); } } //varchar(20) NOT NULL DEFAULT '', 供应商，不用手动指定
        public string OriginSN { get { return originSN; } set { this.ChangeNotify<string>("OriginSN", value, ref originSN); } } //varchar(20) NOT NULL DEFAULT '', 货号
        public int? OnShelves { get { return onShelves; } set { this.ChangeNotify<int?>("OnShelves", value, ref onShelves); } } //tinyint(1) NOT NULL DEFAULT '1', 是否上架


        public string Images { get { return images; } set { this.ChangeNotify<string>("Images", value, ref images); } } //varchar(300) NOT NULL DEFAULT '', 图片
        public int Category { get { return category; } set { this.ChangeNotify<int>("Category", value, ref category); } } //tinyint(2) NOT NULL DEFAULT '0', 主石类别
        public string Name { get { return name; } set { this.ChangeNotify<string>("Name", value, ref name); } } //varchar(50) NOT NULL DEFAULT '', 产品名称
        public int Type { get { return type; } set { this.ChangeNotify<int>("Type", value, ref type); } } //tinyint(2) NOT NULL DEFAULT '0',  类别1
        public int Type2 { get { return type2; } set { this.ChangeNotify<int>("Type2", value, ref type2); } } //tinyint(2) NOT NULL DEFAULT '0',  类别2

        public int Texture { get { return texture; } set { this.ChangeNotify<int>("Texture", value, ref texture); } } //tinyint(2) NOT NULL DEFAULT '0', 种地
        public string Color { get { return color; } set { this.ChangeNotify<string>("Color", value, ref color); } } //varchar(50) NOT NULL DEFAULT '', 颜色
        public string Measurement { get { return measurement; } set { this.ChangeNotify<string>("Measurement", value, ref measurement); } } //varchar(30) NOT NULL DEFAULT '', 尺寸
        public string CertType { get { return certType; } set { this.ChangeNotify<string>("CertType", value, ref certType); } } //varchar(10) NOT NULL DEFAULT '', 证书类型
        public string CertNo { get { return certNo; } set { this.ChangeNotify<string>("CertNo", value, ref certNo); } } //varchar(20) NOT NULL DEFAULT '', 证书号码

        public string Country { get { return country; } set { this.ChangeNotify<string>("Country", value, ref country); } } //varchar(10) NOT NULL DEFAULT '',  国家
        public string State { get { return state; } set { this.ChangeNotify<string>("State", value, ref state); } } //varchar(10) NOT NULL DEFAULT '', 州省
        public decimal? Price { get { return price; } set { this.ChangeNotify<decimal?>("Price", value, ref price); } } //decimal(12,3) NOT NULL DEFAULT '0.000', 价格
        public string Comments { get { return comments; } set { this.ChangeNotify<string>("Comments", value, ref comments); } } //varchar(100) NOT NULL DEFAULT '', 备注 

        
        //数据中心end
        #endregion
    }
}
